/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.cggveritas.crewintranet.jms.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Alassane
 */
@Embeddable
public class CvTravailprimePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "travailleur_id")
    private int travailleurId;
    @Basic(optional = false)
    @Column(name = "typeprime")
    private String typeprime;

    public CvTravailprimePK() {
    }

    public CvTravailprimePK(int travailleurId, String typeprime) {
        this.travailleurId = travailleurId;
        this.typeprime = typeprime;
    }

    public int getTravailleurId() {
        return travailleurId;
    }

    public void setTravailleurId(int travailleurId) {
        this.travailleurId = travailleurId;
    }

    public String getTypeprime() {
        return typeprime;
    }

    public void setTypeprime(String typeprime) {
        this.typeprime = typeprime;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) travailleurId;
        hash += (typeprime != null ? typeprime.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CvTravailprimePK)) {
            return false;
        }
        CvTravailprimePK other = (CvTravailprimePK) object;
        if (this.travailleurId != other.travailleurId) {
            return false;
        }
        if ((this.typeprime == null && other.typeprime != null) || (this.typeprime != null && !this.typeprime.equals(other.typeprime))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "fr.cggveritas.crewintranet.jms.entities.CvTravailprimePK[ travailleurId=" + travailleurId + ", typeprime=" + typeprime + " ]";
    }
    
}
